; (function () {
	new Vue({
		el: '#jwk-view',
		data() {
			return {
				id: hlUrlUtil.GetQueryString('id'),
				data:{
					parkInfo:{
						name:'',
						city:'',
						district:'',
						address:'',
						trafficInfo:'',
						parkingPrice:'',
						location:'',
					}
				},
			}
		},
		methods: {
			// 获取办公租赁详情
			getDetail() {
				var that = this;
				hlhttp.get({
					url: 'jwk/biz_rent_office',
					data: {
						id: this.id
					},
					success: data => {
						that.data = data
						that.mapGaoge()
						if(data.detailIntro){
							$('#content').append(data.detailIntro); 
						}
					}
				})
			},
			// 地图
			//map
			mapGaoge() {
				let center = this.data.parkInfo.location.split(',')
				let map = new AMap.Map('mapGaode', {
					resizeEnable: true,
					center: center,
					zoom: 14
				});
				var marker = new AMap.Marker({
					position: new AMap.LngLat(map.getCenter().lng, map.getCenter().lat),
					icon: '//a.amap.com/jsapi_demos/static/demo-center/icons/poi-marker-default.png',
					offset: new AMap.Pixel(-10, -20)
				});
				map.add(marker);
			},
		},
		mounted() {
			this.getDetail()
		}
	})
}())